home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000419_robertls@nortelnetworks.com_Wed Oct 20 14:52:20 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Path: newsmaster.cc.columbia.edu!newsfeed.nyu.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!chi1.usenetserver.com!news.usenetserver.com!snoopy.risq.qc.ca!nrc-news.nrc.ca!utnut!qcarhaaa.nortelnetworks.com!bcarh189.ca.nortel.com!zcars0v6!not-for-mail
  2. From: "Robert Simmons" <robertls@nortelnetworks.com>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Kermit Script Output Out of Order
  5. Date: Tue, 19 Oct 2004 21:54:51 -0500
  6. Organization: Nortel
  7. Lines: 147
  8. Message-ID: <cl4k1s$97u$1@zcars0v6.ca.nortel.com>
  9. References: <cl29ql$dm7$1@zcars0v6.ca.nortel.com> <slrncnan01.3s1.fdc@sesame.cc.columbia.edu> <cl3tc5$5n0$1@zcars0v6.ca.nortel.com> <_mfdd.83561$Ot3.22349@twister.nyc.rr.com>
  10. NNTP-Posting-Host: robertls-1.us.nortel.com
  11. X-Trace: zcars0v6.ca.nortel.com 1098240893 9470 47.102.125.229 (20 Oct 2004 02:54:53 GMT)
  12. X-Complaints-To: hawkinsj@nortelnetworks.com
  13. NNTP-Posting-Date: Wed, 20 Oct 2004 02:54:53 +0000 (UTC)
  14. X-Priority: 3
  15. X-MSMail-Priority: Normal
  16. X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
  17. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
  18. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15202
  19.  
  20. I am not piping the output of two processes to one file.  I tried the piping
  21. of the output of only the kermit script to help debug the weird behaviour I
  22. was seeing in the output during the fork of the script from the C++ process.
  23.  
  24. As you can see below the line "Hello and welcome to csd_send_script.ksc!"
  25. should be output well before "NO CARRIER" since it takes about 15 seconds
  26. for NO CARRIER to be determined.
  27.  
  28. Here is by script and output file with the command used to redirect.
  29.  
  30. [root:CDragon-99 robertls]# cat csd_send_script.ksc
  31. #!/usr/bin/kermit +
  32.  
  33. echo Hello and welcome to csd_send_script.ksc!\10
  34. echo Speed:              \%1\10
  35. echo Init String:        \%2\10
  36. echo Called Number:      \%3\10
  37. echo Port:               \%4\10
  38. echo Number of Transfer: \%5\10
  39. echo Transfer File Path: \%6\10
  40.  
  41. trace /on all
  42. set port \%4
  43. if fail exit 1 Cannot open \%4
  44. echo Using port \%4\13
  45. #set modem type hayes-high-speed
  46. #set hints off
  47. set modem type hayes-2400
  48. set speed \%1
  49. echo Speed set to \%1\10
  50. set carrier-watch off
  51. set flow-control rts/cts
  52. set transfer slow-start off
  53. set receive packet-length 1500
  54. set transfer display crt
  55. set modem name QualComm_CSD
  56. set modem hangup-method rs232-signal
  57. set modem command hardware-flow AT+ IFC=2,2\{13}
  58. set modem speed-matching off
  59. set transfer interruption off
  60. set input echo on
  61. set modem command init-string \%2\13
  62. if fail exit 1 Cannot communicate with modem
  63. echo Dialing \%3\10
  64. set dial display on
  65. dial \%3\13
  66. #output atdt 9045554444\13
  67. #wait 5 cd
  68. if fail exit 1 Cannot make data call
  69.  
  70. set count \%5
  71. :loop
  72.    echo Sending File. Transfer Count: \v(count)\10
  73.    send \%6
  74.    if success echo Send File #\v(count) complete\10
  75.    if fail echo Failed Sending File #\v(count)
  76. if count goto loop
  77. bye
  78. hangup
  79. echo CSD Send Session Complete.\10
  80. exit 0 CSD Send Session Complete.
  81.  
  82. [root:CDragon-99 robertls]# ./csd_send_script.ksc 115200 AT+CMUX=2
  83. 9049440006 /dev/ttyR5 1 robert > robtemp.err 2>&1
  84. [root:CDragon-99 robertls]# cat robtemp.err
  85. ATQ0
  86. OK
  87. AT+ IFC=2,2
  88. OK
  89. AT+CMUX=2
  90. OK
  91. ATM1L2
  92. OK
  93. ATS7=70
  94. OK
  95. ATD9049440006
  96.  
  97. NO CARRIER
  98. Hello and welcome to csd_send_script.ksc!
  99.  
  100. Speed:              115200
  101.  
  102. Init String:        AT+CMUX=2
  103.  
  104. Called Number:      9049440006
  105.  
  106. Port:               /dev/ttyR5
  107.  
  108. Number of Transfer: 1
  109.  
  110. Transfer File Path: robert
  111.  
  112. TRACE ON
  113. Using port /dev/ttyR5
  114. Speed set to 115200
  115.  
  116. Dialing 9049440006
  117.  
  118.  Hangup OK
  119.  Initializing: 21:30:30...
  120. ATQ0
  121.  Dialing: 21:30:31...
  122. DIAL Failure: 21:30:47:  "NO CARRIER"
  123.  
  124. *************************
  125. DIAL-class command failed.
  126. Modem type:  hayes-2400
  127. Device:      /dev/ttyR5
  128. Speed:       115200
  129. Dial status: 23 [No carrier]
  130.  . Are you sure you have chosen the appropriate modem type?
  131.  . Maybe the interface speed (115200) is too fast:
  132.     SET SPEED to a lower speed and try again.
  133.     SET SPEED ? to see the list of valid speeds.
  134.  . SET MODEM HANGUP-METHOD MODEM-COMMAND and try again.
  135.  . If that doesn't work, try again with SET DIAL HANGUP OFF.
  136.  . SHOW COMMUNICATIONS, SHOW MODEM, SHOW DIAL to see current settings.
  137.  . HELP SET MODEM, HELP SET DIAL, and HELP DIAL for more information.
  138. (Use SET HINTS OFF to suppress future hints.)
  139. *************************
  140.  
  141. Cannot make data call
  142. [1] -F: "/home/robertls/csd_send_script.ksc"
  143. [root:CDragon-99 robertls]#
  144.  
  145.  
  146. "Jeffrey Altman" <jaltman2@nyc.rr.com> wrote in message
  147. news:_mfdd.83561$Ot3.22349@twister.nyc.rr.com...
  148. > Robert Simmons wrote:
  149. >
  150. > > Okay... I'll look into the buffered vs. unbuffered mode.  But what about
  151. the
  152. > > output when it is redirected to a file.  The output from kermit is out
  153. of
  154. > > order there as well.
  155. > >
  156. > > Robert
  157. >
  158. > Don't try piping the output of two processes into the same file
  159. > and you won't have issues with output being out of order.
  160. >
  161. > -- 
  162. > -----------------
  163. > This e-mail account is not read on a regular basis.
  164. > Please send private responses to jaltman at mit dot edu
  165.  
  166.